Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Controller Data Structure

You use a controller data structure to specify information when creating a new controller object. A controller data structure is defined by the TQ3ControllerData data type.

typedef struct TQ3ControllerData {
    char                                *signature;
    unsigned long                       valueCount;
    unsigned long                       channelCount;
    TQ3ChannelGetMethod                 channelGetMethod;
    TQ3ChannelSetMethod                 channelSetMethod;
} TQ3ControllerData;
signature
The controller's signature. A signature is a null-terminated C string that uniquely identifies the manufacturer and model of a controller device. You are responsible for defining your controller's signature.
valueCount
The number of values supported by the controller.
channelCount
The number of channels supported by the controller. If the value in this field is greater than 0, you may define optional routines that get and set those channels.
channelGetMethod
A pointer to a controller's channel-getting method. See [link] for information on this method. This field is valid only if the value in the channelCount field is greater than 0. You may, however, pass NULL in this field if the controller cannot report the current channels.
channelSetMethod
A pointer to a controller's channel-setting method. See [link] for information on this method. This field is valid only if the value in the channelCount field is greater than 0. You may, however, pass NULL in this field if the controller cannot set the channels.

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |